package com.supermarket.manage.common.dto.ucenter.request;

import com.supermarket.manage.common.validation.CheckGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author Faxon
 * @version 1.0
 * @date 2020-03-03 19:04
 **/
@Data
@ApiModel("LoginParams:手机验证码 登录对象")
public class LoginByPhoneCodeParams implements Serializable {

    private static final long serialVersionUID = -4759053674474986202L;

    /**
     * 手机号
     */
    @ApiModelProperty(value = "手机号")
    @Pattern(regexp = CheckGroup.PHONE_VALIDATE, message = "手机号码格式错误")
    @NotBlank(message = "手机号不能为空")
    private String phoneNumber;

    /**
     * 验证码
     */
    @ApiModelProperty(value = "验证码")
    @NotBlank(message = "验证码不能为空")
    private String code;
}
